<h1>Komentari klijenata</h1>
<?= $this->Html->link("+ Dodaj komentar", "/admin_comments/create") ?>

<style type="text/css">
table img{background:#ddd;padding:5px;border:1px solid #ccc}
</style>

<table>
	<tr>
		<th colspan="2">Klijent</th>
		<th>Firma</th>
		<th>Komentar</th>
		<th width="1%"></th>
	</tr>
	<? foreach($comments as $comment): ?>
	<tr>
		<td width="10%"><?= $this->Html->image('customers/' . $comment['CustomerComment']['image'] . '?h=64' ) ?></td>
		<td width="30%" align="left"><?= $this->Html->link($comment['CustomerComment']['name'], '/admin_comments/edit/'.$comment['CustomerComment']['id']) ?></td>
		<td><?= $comment['CustomerComment']['company'] ?></td>
		<td><?= $comment['CustomerComment']['comment'] ?></td>
		<td>
			<?= $this->Html->link('obriši', '/admin_comments/delete/' . $comment['CustomerComment']['id'], array("onclick"=>"return confirm('Da li želite da obrišete komentar?')")) ?>
		</td>
	</tr>
	<? endforeach; ?>
</table>
<?= $this->element('pagination') ?>
